<template>
	<view class="padding">
		<view class="content">
			<rich-text :nodes="item.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: ''
			}
		},
		onLoad(opt) {
			this.get(opt.type);
		},
		methods: {
			get(type) {
				uni.http.post('data/getPage', {keys:type}, res => {
					this.item = res;
					uni.setNavigationBarTitle({
						title: res.name || ''
					});
				});
			},
		}
	}
</script>

<style>
page {background-color: #fff;}
.content {line-height: 1.5rem;}
</style>
